The TADS Alternate Library
Version 2.0

Object Postures


Copyright 2000 by Kevin Forchione.
This is part of the TADS Alternate Library Authors Manual.

Introduction and Table of Contents




Object Postures

 

Postures are largely relevant only to animate objects and include “sitting”, “standing”, and “lying”, while inanimate objects generally can be described as “resting”. Object postures are independent of the type of location. For example, an actor might be “lying on a bed” or “sitting in a chair” or “standing on the train” or “standing in the phone booth”.

 

Alt defines the following postures:

 

 

These postures are all objects of the class Posture. Every object inheriting from class Thing inherits a default posture attribute of resting, while all objects inheriting from class Animate inherit a default posture of standing.

 

The boardingPosture and unboardingPosture Attribute

 

Additionally all objects inherit a boardingPosture and unboardingPosture attribute, which determines the default posture assigned to an actor when boarding or unboarding a location such as a NestedRoom, ChairItem, BedItem, Vehicle, or EnterableSurface, etc. These attributes are assigned to the actor.posture when the actor boards or unboards a location using commands such as <<get on obj>> or <<get off obj>>.

 

An Example

 

Suppose we create a couch for our entryway. The first decision we need to make is whether this object behaves more like a chair or a bed. Suppose we want our actor to be able to lie on the couch as well as sit on it. In Alt ChairItem class objects don’t allow actors to lie on them, but BedItems do, so we derive our couch from BedItem.

 

couch: BedItem

       location = entryway

       noun = ‘couch’

       sDesc = “couch”

;

 

>get on couch

Okay, you're now lying on the couch.

 

The first thing one notices is that getting on the couch means lying on it. In order to change the default behaviour we need to give our couch a boardingPosture of sitting.

 

couch: BedItem

       location = entryway

       noun = ‘couch’

       sDesc = “couch”

       boardingPosture = sitting

;

 

>get on couch

Okay, you're now sitting on the couch.

 

Now our couch behaves as we expect it:

 

>sit on couch

You're already sitting on the couch!

 

>stand on couch

Okay, you're now standing on the couch.

 

>lie on couch

Okay, you're now lying on the couch.

 

>lie on couch

You're already lying on the couch!

 

>stand up

Okay, you're no longer lying on the couch.

 

Status Line

 

Alt status line for NestedRoom locations displays as follows:

 

<actor location’s location short name>, <actor posture> <actor location boarding preposition> <actor location’s short name>

 

For instance, while lying on the couch the status line might display:

 

       Entryway, lying on the couch